package com.matrix.draft.helloworld.sys;

import com.github.kwhat.jnativehook.mouse.NativeMouseEvent;
import com.github.kwhat.jnativehook.mouse.NativeMouseListener;

import java.awt.event.MouseEvent;

public class MyNativeMouseRightReleaseListener implements NativeMouseListener {

    private SmartRobot smartRobot;

    private MyNativeMouseRightReleaseListener() {
    }

    public MyNativeMouseRightReleaseListener(SmartRobot smartRobot) {
        this.smartRobot = smartRobot;
    }

    @Override
    public void nativeMouseReleased(NativeMouseEvent nativeEvent) {
        if(MouseEvent.BUTTON2 == nativeEvent.getButton()){
            if(TestMouseMoving.doMovingThread.isAlive()){
                TestMouseMoving.doMovingThread.pauseThread();
            }
        }
    }
}
